﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page 
{
	protected void Page_Load(object sender, EventArgs e)
	{
		/*for (int i = 3; i < 8; i++)
		{
			Response.Write(string.Format("<font size={0}>hello</font><br>",i));
		}*/

		//if(Session["name"] != null)
		//{
		//    Response.Write("hello " + Session["name"]);
		//}
		//else
		//{
		//    Response.Write("您已经注销，请先<a href=login.aspx>登录</a>");
		//}
		if(!Page.IsPostBack)
		{
			Application.Lock();
			Application["count"] = Convert.ToInt32(Application["count"]) + 1;
			Application.UnLock();
		}
		Response.Write("当前在线人数为" + Application["count"]);
	}


	protected void Button1_Click(object sender, EventArgs e)
	{
		//Response.Redirect(txtUrl.Text);

		Response.Write(Session["name"]);
	}
	protected void lkbLogout_Click(object sender, EventArgs e)
	{
		Session["name"] = null;


	}
}
